if ( answer == 1 ) if ( answer == 1 )
(There are other ways to correctly complete the program.)
Notice that this program has two if
statements in it.
Each true branch is like a rest stop along a highway,
which is either included on the trip, or skipped.
Say that the user wants pin stripes but not anti-lock brakes. A run of the program will look like:
Do you want pin stripes (0 or 1)? 0 Do you want anti-lock brakes (0 or 1)? 1 Total cost is: $20800.0